home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 015 / pset.arc / PSET.ASM next >
Encoding:
Assembly Source File  |  1986-04-24  |  1.4 KB  |  51 lines

  1. ;PSET - Program to Send Printer Control Codes Entered on
  2. ;       the command line to the default printer (lpt1:)
  3. CSEG    segment para public 'code'
  4.         assume cs:CSEG, ds:CSEG, es:CSEG, ss:NOTHING
  5.         org 100h                        ;.com format
  6. PSET    proc
  7. BEGIN:  mov             si,80h         
  8.         cld
  9.         lodsb
  10.         cbw
  11.         mov             cx,ax
  12.         dec             cx
  13.         add             si,cx
  14.         std
  15.         mov             dx,1234h
  16.         call            MANAGER
  17. LOAD:   lodsb
  18.         cmp             al,20h
  19.         jne             MULT
  20.         call            MANAGER
  21.         loop            LOAD
  22. MULT:   sub             al,30h
  23.         mul             bl
  24.         add             dl,al
  25.         mov             al,bl
  26.         mov             bl,0ah
  27.         mul             bl
  28.         mov             bl,al
  29. LOOP:   loop            LOAD
  30.         call            MANAGER
  31. CLEAR:  pop             dx
  32.         cmp             dx,1234h
  33.         je              END
  34.         mov             ah,05h
  35.         int             21h
  36.         jmp             CLEAR
  37. END:    int             20h
  38.         PSET            endp
  39. MANAGER proc
  40.         pop             bx
  41.         push            dx
  42.         push            bx
  43.         mov             bl,1
  44.         xor             dx,dx
  45.         ret
  46.         MANAGER         endp
  47.         CSEG            ends
  48. end     BEGIN
  49.  
  50.  
  51.